package com.ctshk.rpc.bus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.bus.entity.BusProductStrategyDate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 巴士产品加幅有效期 Mapper 接口
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-02-19
 */
public interface BusProductStrategyDateMapper extends BaseMapper<BusProductStrategyDate> {

    /**
     * 据渠道加幅日期查询产品加幅详情信息
     * @param queryDate
     * @return
     */
        @Select("<script>"+"select id,increase_strategy_id,date_begin,date_end from t_bus_product_strategy_date \n" +
                "where date_begin &lt;= #{queryDate} and date_end &gt;= #{queryDate}\n" +
                "</script>")
        List<BusProductStrategyDate> queryList(@Param("queryDate") LocalDate queryDate);

}
